Optimal. Leaf size=84 \[ -\frac {d (a d (1+n)-b (c+2 c n)) x}{b^2 (1+n)}+\frac {d x \left (c+d x^n\right )}{b (1+n)}+\frac {(b c-a d)^2 x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )}{a b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {427, 396, 251}
\begin {gather*} \frac {x (b c-a d)^2 \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )}{a b^2}-\frac {d x (a d (n+1)-b (2 c n+c))}{b^2 (n+1)}+\frac {d x \left (c+d x^n\right )}{b (n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 251
Rule 396
Rule 427
Rubi steps
\begin {align*} \int \frac {\left (c+d x^n\right )^2}{a+b x^n} \, dx &=\frac {d x \left (c+d x^n\right )}{b (1+n)}+\frac {\int \frac {-c (a d-b c (1+n))-d (a d (1+n)-b (c+2 c n)) x^n}{a+b x^n} \, dx}{b (1+n)}\\ &=-\frac {d (a d (1+n)-b (c+2 c n)) x}{b^2 (1+n)}+\frac {d x \left (c+d x^n\right )}{b (1+n)}+\frac {(b c-a d)^2 \int \frac {1}{a+b x^n} \, dx}{b^2}\\ &=-\frac {d (a d (1+n)-b (c+2 c n)) x}{b^2 (1+n)}+\frac {d x \left (c+d x^n\right )}{b (1+n)}+\frac {(b c-a d)^2 x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )}{a b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 5 in
optimal.
time = 0.31, size = 75, normalized size = 0.89 \begin {gather*} \frac {x \left (2 c d x^n \Phi \left (-\frac {b x^n}{a},1,1+\frac {1}{n}\right )+d^2 x^{2 n} \Phi \left (-\frac {b x^n}{a},1,2+\frac {1}{n}\right )+c^2 \Phi \left (-\frac {b x^n}{a},1,\frac {1}{n}\right )\right )}{a n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\left (c +d \,x^{n}\right )^{2}}{a +b \,x^{n}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 1.97, size = 170, normalized size = 2.02 \begin {gather*} - \frac {2 c d x \Phi \left (\frac {a x^{- n} e^{i \pi }}{b}, 1, \frac {e^{i \pi }}{n}\right ) \Gamma \left (\frac {1}{n}\right )}{b n^{2} \Gamma \left (1 + \frac {1}{n}\right )} + \frac {c^{2} x \Phi \left (\frac {b x^{n} e^{i \pi }}{a}, 1, \frac {1}{n}\right ) \Gamma \left (\frac {1}{n}\right )}{a n^{2} \Gamma \left (1 + \frac {1}{n}\right )} + \frac {2 d^{2} x x^{2 n} \Phi \left (\frac {b x^{n} e^{i \pi }}{a}, 1, 2 + \frac {1}{n}\right ) \Gamma \left (2 + \frac {1}{n}\right )}{a n \Gamma \left (3 + \frac {1}{n}\right )} + \frac {d^{2} x x^{2 n} \Phi \left (\frac {b x^{n} e^{i \pi }}{a}, 1, 2 + \frac {1}{n}\right ) \Gamma \left (2 + \frac {1}{n}\right )}{a n^{2} \Gamma \left (3 + \frac {1}{n}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (c+d\,x^n\right )}^2}{a+b\,x^n} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________